package com.hxzy.dto;

import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.util.Objects;

/**
 * 后台登录用户请求类说明
 *
 * @author admin
 * @date 2021-09-01
 */
@Getter
@Setter
public class AdminLoginDTO {
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AdminLoginDTO that = (AdminLoginDTO) o;
        return Objects.equals(username, that.username) && Objects.equals(password, that.password) && Objects.equals(validateCode, that.validateCode) && Objects.equals(rememberMe, that.rememberMe);
    }

    @Override
    public int hashCode() {
        return Objects.hash(username, password, validateCode, rememberMe);
    }

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "密码不能为空")
    private String password;

    @NotBlank(message = "验证码不能为空")
    private String validateCode;

    private Boolean rememberMe;
}
